Open
Conversation
Previously, verses were sorted in the UI code after loading from JSON files. This meant every client (web and mobile) had to implement their own sorting logic. Changes: - Updated migration script to sort verses by their starting number when generating v4 data - Regenerated all common and author JSON files with sorted verses - Removed sorting logic from web UI (queries.ts and verse page.tsx) - Updated Flutter app with sorted data and regenerated compressed files Benefits: - Single source of truth for verse ordering - Consistent ordering across web and mobile apps - Simplified client code by removing redundant sorting logic - Better performance as sorting is done once at build time
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Fixed inconsistent newline formatting in Sanskrit text that was causing: 1. Unwanted gaps between lines of the same verse (had \n\n, should be \n) 2. Verses running together in ranges (had \n, should be \n\n between verses) Changes: - Updated process_v1_data_fixed.py to normalize line breaks: - Single verses: Replace \n\n with \n (no gaps within verse) - Verse ranges: Normalize each verse, then join with \n\n (proper separation) - Regenerated all v4 common and author JSON files - Updated both web and Flutter app data Result: - Single verses now display with proper line spacing - Verse ranges (e.g., 4-6) now have clear visual separation between each verse
Fixed bug in v1 source data where verse 5 had 3 lines instead of 2: - Verse 5 had verse 6's first line incorrectly appended - Verse 6 was missing its first line Now all verses correctly have 2 lines each matching Sanskrit structure: - Verse 4: 2 lines ✅ - Verse 5: 2 lines ✅ (was 3 lines ❌) - Verse 6: 2 lines ✅ (was 1 line ❌) Changes: - Fixed v1/verse.json source data - Regenerated all v4 data files - Updated both web and Flutter app data
Fixed data corruption in v1 source where transliteration lines were misattributed between verses: - Verse 1.20: Removed extra line that belonged to verse 1.21 - Verse 1.21: Added missing middle line This ensures proper alignment between Sanskrit and transliteration, with verse 1.21-22 now correctly showing 5 transliteration lines (speaker designation + 2 lines from v21 + 2 lines from v22).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why This Change?
Previously, verses were not sorted in the JSON files themselves. This meant:
Now verses are sorted once at build time in the data generation script, ensuring consistency across all platforms.
Changes Made
Data Generation (gita-data-2.0)
migrate_to_v4.pythat sorts verses by their starting numberWeb App (bg-frontend)
.sort()call fromsrc/lib/data/queries.tspage.tsxFlutter App (gita-flutter-2.0)
assets/data/.gzfiles inassets/compressed_data/Testing